package ModelLayer;

import java.util.Date;
import java.util.ArrayList;

public class SalesOrder {
	private int id;
	private Date creationDate;
	private Date paymentDate;
	private double total;
	private String status;
	private int discount;
	private Employee employee;
	private ArrayList<SalesLine> salesLine;
	private Delivery delivery;
	private Contact customer;
	
	public SalesOrder(int id, Date creationDate, Date paymentDate, double total, String status, int discount, Contact customer, Employee employee, ArrayList<SalesLine> salesLine, Delivery delivery){
		this.setId(id);
		this.setCreationDate(creationDate);
		this.setPaymentDate(paymentDate);
		this.setTotal(total);
		this.setStatus(status);
		this.setDiscount(discount);
		this.setEmployee(employee);
		this.setSalesLine(salesLine);
		this.setDelivery(delivery);
		this.setCustomer(customer);
	}
	
	public SalesOrder(){
		this.setId(0);
		this.setCreationDate(new Date());
		this.setPaymentDate(new Date());
		this.setTotal(0.0);
		this.setStatus("");
		this.setDiscount(0);
		this.setCustomer(new Contact());
		this.setEmployee(new Employee());
		this.setSalesLine(new ArrayList<SalesLine>());
		this.setDelivery(new Delivery());
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public Date getCreationDate() {
		return creationDate;
	}

	public void setCreationDate(Date creationDate) {
		this.creationDate = creationDate;
	}

	public Date getPaymentDate() {
		return paymentDate;
	}

	public void setPaymentDate(Date paymentDate) {
		this.paymentDate = paymentDate;
	}

	public double getTotal() {
		return total;
	}

	public void setTotal(double total) {
		this.total = total;
	}

	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public int getDiscount() {
		return discount;
	}

	public void setDiscount(int discount) {
		this.discount = discount;
	}

	public Contact getCustomer() {
		return customer;
	}

	public void setCustomer(Contact customer) {
		this.customer = customer;
	}

	public Employee getEmployee() {
		return employee;
	}

	public void setEmployee(Employee employee) {
		this.employee = employee;
	}

	public ArrayList<SalesLine> getSalesLine() {
		return salesLine;
	}

	public void setSalesLine(ArrayList<SalesLine> salesLine) {
		this.salesLine = salesLine;
	}

	public Delivery getDelivery() {
		return delivery;
	}

	public void setDelivery(Delivery delivery) {
		this.delivery = delivery;
	}
}
